﻿
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
 
<meta http-equiv="x-ua-compatible" content="IE=EmulateIE8" >

  <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0" />
  <title>南疆片区收费站货车收费费率计算器</title>
  <link rel="stylesheet" href="bootstrap.min.css">

  <!-- 可选的Bootstrap主题文件（一般不用引入） -->
  <link rel="stylesheet" href="bootstrap-theme.min.css">

  <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
  <script src="jquery.min.js"></script>

  <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
  <script src="bootstrap.min.js"></script>
    <script language="javascript" type="text/javascript">
        var RHY_Fare = {
            toll: [
                    { name: "阿勒泰-克孜哈巴克", lc: 166.0000,fl: 0.0500},
                    { name: "阿勒泰-恰库尔图", lc: 226.0000,fl: 0.0500},
                    { name: "阿勒泰-布尔津", lc: 103.8000,fl: 0.0500},
                    { name: "阿勒泰-乌图布拉克", lc: 111.5000,fl: 0.0500},
                    { name: "塔  城-恰夏", lc: 51.0000,fl: 0.0700},
                    { name: "石河子-沙门子", lc: 105.0000,fl: 0.0700},
                    { name: "石河子-新湖", lc: 109.0000,fl: 0.0700},
                    { name: "石河子-安集海东", lc: 107.2000, fl: 0.0500 },
                    { name: "石河子-玛纳斯", lc: 61.7000, fl: 0.0700 },
                    { name: "石河子-玛纳斯匝道", lc: 12.3000, fl: 0.0700 },
                    { name: "石河子-乌兰乌苏匝道", lc: 22.9000, fl: 0.0700 },
                    { name: "石河子-沙湾匝道", lc: 39.5000, fl: 0.0700 },
                    { name: "石河子-安集海匝道", lc: 63.6000, fl: 0.0700 },
                    { name: "石河子-红光", lc: 69.3700, fl: 0.0500 },
                    { name: "奎  屯-乌尔禾", lc: 93.9000,fl: 0.0500},
                    { name: "奎  屯-奎屯北", lc: 69.8000,fl: 0.0500},
                    { name: "奎  屯-小拐", lc: 42.0000,fl: 0.0700},
                    { name: "奎  屯-天北", lc: 72.7620,fl: 0.0700},
                    { name: "奎  屯-克拉玛依", lc: 61.7580, fl: 0.0700 },
                    { name: "奎  屯-奎屯", lc: 96.7000, fl: 0.0700 },
                    { name: "昌  吉-榆树沟", lc: 40.5000,fl: 0.0700},
                    { name: "昌  吉-玛河", lc: 61.7000,fl: 0.0500},
                    { name: "昌  吉-双涝坝", lc: 73.0000,fl: 0.0500},
                    { name: "昌  吉-大黄山", lc: 139.0000, fl: 0.0500 },
                    { name: "昌  吉-昌吉匝道", lc: 40.5000, fl: 0.0700 },
                    { name: "吐鲁番-库米什", lc: 160.0000,fl: 0.0700}, 
                    { name: "吐鲁番-鄯善东", lc: 68.800, fl: 0.070 },
                    { name: "吐鲁番-吐峪沟", lc: 64.4, fl: 0.070},
                    { name: "哈  密-星星峡", lc: 99.400, fl: 0.070 },
                    { name: "哈  密-烟墩", lc: 109.300, fl: 0.070 },
                    { name: "哈  密-二堡", lc: 80.300, fl: 0.070 },
                    { name: "哈  密-一碗泉", lc: 162.200, fl: 0.070 },
                    { name: "哈  密-萨尔乔克", lc: 384.0000, fl: 0.0500 },
                    { name: "乌鲁木齐-三坪匝道", lc: 16.4000,fl: 0.0700},
                    { name: "乌鲁木齐-头屯河", lc: 67.9000,fl: 0.0700}
                       ],
            limite: [{ zs: 2, name: "二轴车", xz: 17,XZ1:20 },
                    { zs: 3, name: "三轴车", xz: 27,XZ1:30 },
                    { zs: 4, name: "四轴车", xz: 37 ,XZ1:40},
                    { zs: 5, name: "五轴车", xz: 43 ,XZ1:50},
                    { zs: 6, name: "六轴车", xz: 49,XZ1:55}],
            carClass: [{ type: 0, name: "普通货车" }, { type: 1, name: "大件运输车"},{ type: 2, name: "标准集装箱"},
            { type: 3, name: "罐装运输"},
                    { type: 4, name: "甩挂运输"},
                    { type: 5, name: "绿色通道"},{ type: 6, name: "载有固定装置车"}],
            Constant: { LimitOfTheWeightBasicFareRate: 10,
                LimitOfTheWeightMinimumFareRate: 40,
                MinimumWeightForFareWeight: 4,
                TheFirstMultiplier: 1.3,
                TheSecondMultiplier: 2.0,
                TheFirstRateLimit: 1,
                TheSecondRateLimit: 6,
                TheMaxRateLimit: 12
            },
            result: {
                lc:  0,
                WeightLimit: 0,
                WeightLimitBIG: 0,
                AlxNum: 0,
                ISOverLoad: false,
                NormalWeight: 0,
                LowOverloadWeight: 0,
                HighOverloadWeight_I: 0,
                HighOverloadWeight_II: 0,
                Weight: 0,
                FareI: 0,
                FareII: 0,
                FareIII_I: 0,
                FareIII_II: 0,
                WeightTollFare: 0,
                FEQZ: 0,
                BasicFareRate: 0,
                MinimumFareRate: 0,
                Overload: 0,
                OverloadBIG: 0,
                OverloadRatio: 0,
                OverloadRatioBIG: 0,
                CarClass: 0
            },
            InitResult: function () {
                this.result.lc = 0;
                this.result.WeightLimit = 0;
                this.result.WeightLimitBIG = 0;
                this.result.ISOverLoad = false;
                this.result.NormalWeight = 0;
                this.result.LowOverloadWeight = 0;
                this.result.HighOverloadWeight_I = 0;
                this.result.HighOverloadWeight_II = 0;
                this.result.Weight = 0;
                this.result.FareI = 0;
                this.result.FareII = 0;
                this.result.FareIII_I = 0;
                this.result.FareIII_II = 0;
                this.result.WeightTollFare = 0;
                this.result.FEQZ = 0;
                this.result.BasicFareRate = 0;
                this.result.MinimumFareRate = 0;
                this.result.Overload = 0;
                this.result.OverloadRatio = 0;
                this.result.OverloadBIG = 0;
                this.result.OverloadRatioBIG = 0;
                this.result.CarClass = 0;
            },
            InitWeight: function () 
            {
                this.result.ISOverLoad = this.result.Weight > this.result.WeightLimit;
                if (this.result.Weight > (this.result.WeightLimit * this.Constant.TheSecondMultiplier)) 
                {
                    this.result.HighOverloadWeight_II = this.result.Weight - this.result.WeightLimit * this.Constant.TheSecondMultiplier;
                    this.result.HighOverloadWeight_I = this.result.WeightLimit * this.Constant.TheSecondMultiplier - this.result.WeightLimitBIG;
                    this.result.LowOverloadWeight = this.result.WeightLimit * (this.Constant.TheFirstMultiplier - 1);
                    this.result.NormalWeight = this.result.WeightLimitBIG;
                }
                else if (this.result.Weight > this.result.WeightLimitBIG ) 
                {
                    this.result.HighOverloadWeight_I = this.result.Weight - this.result.WeightLimitBIG ;
                    this.result.LowOverloadWeight = 0;
                    this.result.NormalWeight = this.result.WeightLimitBIG ;
                }
                else 
                {
                    this.result.NormalWeight = this.result.Weight;
                }
            },
            InitBigWeight: function () 
            {
                this.result.ISOverLoad = this.result.Weight > this.result.WeightLimit;
                if (this.result.Weight > this.result.WeightLimit) 
                {
                    this.result.LowOverloadWeight = this.result.Weight - this.result.WeightLimit;
                    this.result.NormalWeight = this.result.WeightLimit;

                }
                else 
                {
                    this.result.NormalWeight = this.result.Weight;
                }
            },
            FarePartI: function () 
            {
                var UseBasicFareRateOfWeight = 0;
                var UseLinearDecOfWeight = 0;
                var UseMiniFareRateOfWeight = 0;
                if (this.result.NormalWeight > this.Constant.LimitOfTheWeightMinimumFareRate) 
                {
                    UseMiniFareRateOfWeight = this.result.NormalWeight - this.Constant.LimitOfTheWeightMinimumFareRate;
                    UseLinearDecOfWeight = this.Constant.LimitOfTheWeightMinimumFareRate - this.Constant.LimitOfTheWeightBasicFareRate;
                    UseBasicFareRateOfWeight = this.Constant.LimitOfTheWeightBasicFareRate;
                }
                else if (this.result.NormalWeight > this.Constant.LimitOfTheWeightBasicFareRate) {
                    UseLinearDecOfWeight = this.result.NormalWeight - this.Constant.LimitOfTheWeightBasicFareRate;
                    UseBasicFareRateOfWeight = this.Constant.LimitOfTheWeightBasicFareRate;
                }
                else 
                {
                    UseBasicFareRateOfWeight = this.result.NormalWeight;
                }
                this.result.FareI = UseBasicFareRateOfWeight * this.result.BasicFareRate * this.result.lc;
                this.result.FareI += (this.result.BasicFareRate + (this.result.BasicFareRate - ((this.result.BasicFareRate - this.result.MinimumFareRate) / (this.Constant.LimitOfTheWeightMinimumFareRate - this.Constant.LimitOfTheWeightBasicFareRate)) * UseLinearDecOfWeight)) / 2 * this.result.lc * UseLinearDecOfWeight;
                this.result.FareI += UseMiniFareRateOfWeight * this.result.MinimumFareRate * this.result.lc;
            },
            FarePartII: function () 
            {
                this.result.FareII = 0; // this.result.LowOverloadWeight * this.result.BasicFareRate * this.result.lc;
            },
            FarePartIII_I: function () {
                var FareRate = this.result.BasicFareRate * (
                    (this.Constant.TheFirstRateLimit + this.result.HighOverloadWeight_I * (this.Constant.TheSecondRateLimit - this.Constant.TheFirstRateLimit) /
                    ((this.Constant.TheSecondMultiplier - this.Constant.TheFirstMultiplier) * this.result.WeightLimit))
                    );
                this.result.FareIII_I = this.result.HighOverloadWeight_I * this.result.lc * (FareRate + (this.Constant.TheFirstRateLimit * this.result.BasicFareRate)) / 2;
            },
            FarePartIII_I_2013: function () 
            {
                var FareStandRate = 0;
                if(this.result.WeightLimitBIG>40)
                {
                    FareStandRate = this.result.MinimumFareRate;
                }
                else
                {
                    FareStandRate = this.result.BasicFareRate - 
                        ((this.result.BasicFareRate - this.result.MinimumFareRate)/(this.Constant.LimitOfTheWeightMinimumFareRate - this.Constant.LimitOfTheWeightBasicFareRate))*(this.result.WeightLimitBIG-this.Constant.LimitOfTheWeightBasicFareRate);
                }
                 var FareRate   =   FareStandRate +  this.result.HighOverloadWeight_I*(this.Constant.TheSecondRateLimit*this.result.BasicFareRate - FareStandRate) / (this.Constant.TheSecondMultiplier*this.result.WeightLimit - this.result.WeightLimitBIG)  ;      
                this.result.FareIII_I = this.result.HighOverloadWeight_I * this.result.lc * (FareRate + FareStandRate) / 2;
            },
            FarePartIII_II: function () 
            {
                this.result.FareIII_II = this.result.HighOverloadWeight_II * this.result.lc * this.result.BasicFareRate * this.Constant.TheMaxRateLimit;
            },
            InitWeightTollFare: function () {
                this.result.WeightTollFare = this.result.FareI + this.result.FareII + this.result.FareIII_I + this.result.FareIII_II;
            },
            RoundToFinalFare: function () 
            {
                var FinalFare = (this.result.WeightTollFare);
                if (FinalFare < 5) {
                    FinalFare = 5;
                }
                FinalFare *=10;
                var y = FinalFare % 10;
                FinalFare -=y;
                if(y>=5)
                {
                    FinalFare +=10
                }
                this.result.FEQZ = FinalFare /10;
            },
            BigFare: function () 
            {
                //this.FarePartI();
				this.result.FareI = this.result.NormalWeight * this.result.BasicFareRate * this.result.lc
                this.result.FareII = this.result.LowOverloadWeight * this.result.BasicFareRate * this.result.lc;
            },
            Fare75: function()
            {
                this.result.WeightTollFare = this.result.WeightTollFare*0.75
            },
            NomalFareForTrucks: function (pWeight, paxesNum, ptoll, pcarclass) 
            {
                this.InitResult();
                this.result.Weight = pWeight <4 ? 4 : pWeight;

                this.result.lc = ptoll.lc;
                this.result.WeightLimit = paxesNum.xz;
                this.result.WeightLimitBIG = paxesNum.XZ1;
                this.result.AlxNum = paxesNum.zs
                this.result.BasicFareRate = ptoll.fl;
                this.result.CarClass = pcarclass ? pcarclass.type : 0;
                this.result.Weight  = (this.result.CarClass == 6) ? this.result.Weight/2:this.result.Weight;

                this.result.Weight = this.result.Weight <4 ? 4 : this.result.Weight;
                this.result.MinimumFareRate = this.result.BasicFareRate / 2;
                if ((this.result.Weight - this.result.WeightLimit) > 0) 
                {
                    this.result.Overload = this.result.Weight - this.result.WeightLimit;
                    this.result.OverloadRatio = ((this.result.Weight / this.result.WeightLimit) - 1) * 100;
                }
                if ((this.result.Weight - this.result.WeightLimitBIG) > 0) 
                {
                    this.result.OverloadBIG = this.result.Weight - this.result.WeightLimitBIG;
                    this.result.OverloadRatioBIG = ((this.result.Weight / this.result.WeightLimitBIG) - 1) * 100;
                }
                switch (this.result.CarClass) 
                {
                    case 1:
                        this.InitBigWeight();
                        this.BigFare();                       
                        

                        break;
                    default:
                        this.InitWeight();
                        this.FarePartI();
                        this.FarePartII();
                        this.FarePartIII_I_2013();
                        this.FarePartIII_II();
                        break;
                }

                this.InitWeightTollFare();
                switch (this.result.CarClass) 
                {
                    case 2:
                    case 3:
                    case 4:
                         if(this.result.Weight <= this.result.WeightLimitBIG)
                        {
                            this.Fare75();  
                        }                                            
                        break;
                    case 5:
                        if(this.result.Weight <= this.result.WeightLimitBIG*1.05)
                        {
                            this.result.WeightTollFare = 0;
                        }
                        break;
                }
                this.RoundToFinalFare();
                return this.result;
            }
        };
        var RHY_FareUI = 
        {
            Weight: null,
            Alxs: null,
            lc: null,
            Fl: null,
            Toll: null,
            Run: null,
            Result: null,
            CarClass: null,
            InitComBox: function (obj, temp) {
                var i = 0;
                obj.innerHTML = "";
                for (i = 0; i < temp.length; i++) {
                    oOption = document.createElement("OPTION");
                    obj.options.add(oOption);
                    oOption.innerText = temp[i].name;
                    oOption.value = temp[i];
                    oOption.RHYOBJ = temp[i];
                }
            },
            Format: function (temp) {
                var r = "";
                switch (typeof (temp)) {
                    case "boolean":
                        r = temp ? "是" : "否";
                        break;
                    case "number":
                        r = Math.round(temp * 10000) / 10000;
                        break;
                    default:
                        r = temp;
                        break;
                }
                return r;
            },
            ShowUI: function (temp) 
            {
                for (var r in temp) 
                {
                    var obj = document.getElementById("RHY_Fare_Result_" + r);
                    if (obj != null) 
                    {
                        obj.innerHTML = this.Format(temp[r]);
                    }
                }
            },
            InitOKButton: function () 
            {
                this.Run.RHYOBJ = this;
                this.Run.onclick = function () 
                {
                    var rhyobj = this.RHYOBJ;
                    var Weight = rhyobj.Weight.value * 1;
                    var Alxs = rhyobj.Alxs.options[rhyobj.Alxs.selectedIndex].RHYOBJ;
                    var Toll = rhyobj.Toll.options[rhyobj.Toll.selectedIndex].RHYOBJ;
                    var CarClass = rhyobj.CarClass.options[rhyobj.CarClass.selectedIndex].RHYOBJ;
                    rhyobj.ShowUI(RHY_Fare.NomalFareForTrucks(Weight, Alxs, Toll, CarClass));
                }
            },
            Init: function () 
            {
                this.Result = null;
                this.Weight.Value = 0;
                this.InitComBox(this.Toll, RHY_Fare.toll);
                this.InitComBox(this.Alxs, RHY_Fare.limite);
                this.InitComBox(this.CarClass, RHY_Fare.carClass);
                this.InitOKButton();
            }

        }
        this.onload = function () {
            RHY_FareUI.Weight = document.getElementById("Weightdev");
            RHY_FareUI.Alxs = document.getElementById("alxsdev");
            RHY_FareUI.Toll = document.getElementById("tolldev");
            RHY_FareUI.CarClass = document.getElementById("carclassdev");
            RHY_FareUI.Run = document.getElementById("godev");
            RHY_FareUI.Result = document.getElementById("Resultdev");
            RHY_FareUI.Init();
        }

    </script>
    <style type="text/css">
        *
        {
            font-size: 12px;
            text-align: center;
        }
        .title
        {
            text-align: right;
            width: 150px;
        }
        .value
        {
            text-align: left;
            width: 150px;
        }
        .dw
        {
            text-align: left;
            width: 50px;
        }
        input
        {
            width: 88px;
            text-align: right;
            border-style: none none solid none;
            border-width: 0px 0px thin 0px;
            border-bottom-color: #000000;
        }
        select
        {
            width: 100px;
            border-style: none none none none;
        }
        body
        {
            text-align: center;
        }
        #SerachDev
        {
            text-align: center;
        }
        table, td
        {
            border: 1px solid #000000;
        }
        table
        {
        }
    </style>
</head>
<body style="background-color:#cfddee">
<div class="col-lg-offset-3 col-lg-6 col-md-offset-2 col-md-8 ">
  <div class="list-group">
    <table align="center" class="table table-bordered">
    
        <tr  class="success">
            <td colspan="3">
                <table  class="table table-bordered">
                    <tr  class="info">
                        <td >
                            收费站：
                        </td>
                        <td >
                            <select id="tolldev" style="width: 200px">
                            </select>
                        </td>
						    </tr>
						     <tr  class="info">
                        <td >
                            车轴数：
                        </td>
                        <td>
                            <select id="alxsdev"  style="width: 200px">
                            </select>
                        </td>
                    </tr>
                    
                    <tr  class="info">
                        <td >
                            车货总重：
                        </td>
                        <td >
                            <input id="Weightdev" type="text" value="5"  style="width: 200px" />吨
                        </td>
						    </tr>
						     <tr  class="info">
                        <td >
                            车种：
                        </td>
                        <td>
                            <select id="carclassdev">
                            </select>
                        </td>
                    </tr>
                    <tr  class="info">
                        <td colspan="4">
                            <button id="godev" style="width: 100px">
                                计算</button>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr class="panel panel-default">
            <td colspan="3"  class="panel-heading">
                计算结果
            </td>
        </tr>
        <tr  class="danger">
            <td class="title">
                收费里程:
            </td>
            <td class="value">
                <span id="RHY_Fare_Result_lc">0</span>
            </td>
            <td class="dw">
                公里
            </td>
        </tr>
         <tr  class="info">
            <td class="title">
                基本费率:
            </td>
            <td class="value">
                <span id="RHY_Fare_Result_BasicFareRate">0</span>
            </td>
            <td class="dw">
                元
            </td>
        </tr>
        <tr  class="danger">
            <td  align="right" class="title">
                公路承载能力认定标准:
            </td>
            <td class="value">
                <span id="RHY_Fare_Result_WeightLimit">0</span>
            </td>
            <td class="dw">
                吨
            </td>
        </tr>
         <tr  class="success">
            <td class="title">
                超载:
            </td>
            <td class="value">
                <span id="RHY_Fare_Result_Overload">0</span>
            </td>
            <td class="dw">
                吨
            </td>
        </tr>
        <tr class="danger">
            <td class="title">
                超载比率:
            </td>
            <td class="value">
                <span id="RHY_Fare_Result_OverloadRatio">0</span>
            </td>
            <td class="dw">
                %
            </td>
        </tr>
         <tr  class="success">
            <td align="right" class="title">
                公路超限认定标准:</td>
            <td class="value">
                <span id="RHY_Fare_Result_WeightLimitBIG">0</span>
            </td>
            <td class="dw">
                吨
            </td>
        </tr>
       <tr  class="danger">
            <td class="title">
                超限:
            </td>
            <td class="value">
                <span id="RHY_Fare_Result_OverloadBIG">0</span>
            </td>
            <td class="dw">
                吨
            </td>
        </tr>
        <tr  class="success">
            <td class="title">
                超限比率:
            </td>
            <td class="value">
                <span id="RHY_Fare_Result_OverloadRatioBIG">0</span>
            </td>
            <td class="dw">
                %
            </td>
        </tr>
        <tr  class="danger">
            <td class="title">
                收费金额:
            </td>
            <td class="value">
                <span id="RHY_Fare_Result_FEQZ">0</span>
            </td>
            <td class="dw">
                元
            </td>
        </tr>
    </table>
    <!--</div>-->
	 <br>
更多计算器请长安二维码关注微信号		  
<br>
<img src='qrcode_for_gh_9a9c2300e1f5_258.jpg'>
<br>
	<script language="javascript" type="text/javascript" src="http://js.users.51.la/18569112.js"></script>
<noscript><a href="http://www.51.la/?18569112" target="_blank"><img alt="&#x6211;&#x8981;&#x5566;&#x514D;&#x8D39;&#x7EDF;&#x8BA1;" src="http://img.users.51.la/18569112.asp" style="border:none" /></a></noscript>
  </div>
    </div></body>
</html>
